package com.ruoyi.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.product.mapper.CouponHaveMapper;
import com.ruoyi.product.domain.CouponHave;
import com.ruoyi.product.service.ICouponHaveService;

/**
 * 优惠持有Service业务层处理
 * 
 * @author guoguoa
 * @date 2025-01-07
 */
@Service
public class CouponHaveServiceImpl implements ICouponHaveService 
{
    @Autowired
    private CouponHaveMapper couponHaveMapper;

    /**
     * 查询优惠持有
     * 
     * @param id 优惠持有主键
     * @return 优惠持有
     */
    @Override
    public CouponHave selectCouponHaveById(Integer id)
    {
        return couponHaveMapper.selectCouponHaveById(id);
    }

    /**
     * 查询优惠持有列表
     * 
     * @param couponHave 优惠持有
     * @return 优惠持有
     */
    @Override
    public List<CouponHave> selectCouponHaveList(CouponHave couponHave)
    {
        return couponHaveMapper.selectCouponHaveList(couponHave);
    }

    /**
     * 新增优惠持有
     * 
     * @param couponHave 优惠持有
     * @return 结果
     */
    @Override
    public int insertCouponHave(CouponHave couponHave)
    {
        return couponHaveMapper.insertCouponHave(couponHave);
    }

    /**
     * 修改优惠持有
     * 
     * @param couponHave 优惠持有
     * @return 结果
     */
    @Override
    public int updateCouponHave(CouponHave couponHave)
    {
        return couponHaveMapper.updateCouponHave(couponHave);
    }

    /**
     * 批量删除优惠持有
     * 
     * @param ids 需要删除的优惠持有主键
     * @return 结果
     */
    @Override
    public int deleteCouponHaveByIds(Integer[] ids)
    {
        return couponHaveMapper.deleteCouponHaveByIds(ids);
    }

    /**
     * 删除优惠持有信息
     * 
     * @param id 优惠持有主键
     * @return 结果
     */
    @Override
    public int deleteCouponHaveById(Integer id)
    {
        return couponHaveMapper.deleteCouponHaveById(id);
    }
}
